package com.tianji.learning.controller;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.plugins.pagination.PageDto;
import com.tianji.learning.domain.query.PointsBoardQuery;
import com.tianji.learning.domain.vo.PointsBoardItemVO;
import com.tianji.learning.domain.vo.PointsBoardVO;
import com.tianji.learning.service.IPointsBoardService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 学霸天梯榜 前端控制器
 * </p>
 *
 * @author author
 * @since 2025-03-28
 */
@Api(tags = "分页查询积分排行榜相关接口")
@Slf4j
@RestController
@RequestMapping("/boards")
@RequiredArgsConstructor
public class PointsBoardController {

    private final IPointsBoardService pointsBoardService;

    /**
     * 查询积分榜单
     * @param pointsBoardQuery
     * @return
     */
    @ApiOperation("分页查询指定赛季的积分排行榜")
    @GetMapping
    public PointsBoardVO getBoardVO(PointsBoardQuery pointsBoardQuery) {
        return pointsBoardService.getBoard(pointsBoardQuery);
    }
}
